Day 1: Getting data into shape

Tidyverse world

Ben Fanson https://bfanson.github.io/2024DADAworkshop/ (Arthur Rylah Institute)https://www.ari.vic.gov.au/
2024-09-04

Day’s objectives

  1. Understand workflow, why it is important, and how to do it using Rstudio/R
  2. Have an understanding of the tidyverse framework and its key packages
  3. Work through an example

Key packages

Example of some workflows

mine

Paul’s

Commonalities

Advantages of workflow

asfd

adsf

Dataset for workshop

For this workshop, we will you an example dataset to go through the whole workflow process.

Rstudio

You can find a variety of cheatsheets at https://posit.co/resources/cheatsheets/

Basics

Tips and tricks

Programming good technique

Tidyverse framework

Historical context

Importing

Saving the data files

At the end of the import and clean stage, I save the dataset as a

Excel files

CSV/Table

Your Task

Joins

Show code
  knitr::include_graphics("lubridate.pdf")

knitr::include_graphics(“dplyr.pdf”)







Note: joins = merges (synonyms)

Tips and tricks

Your Task

Restructuring

Show code
  knitr::include_graphics("lubridate.pdf")

knitr::include_graphics(“tidyr.pdf”)







Your Task

String manipulation

Show code
  knitr::include_graphics("lubridate.pdf")

knitr::include_graphics(“stringr.pdf”)







Your Task

Date/time

Show code
  knitr::include_graphics("lubridate.pdf")







Your Task

Saving the clean data

At the end of the import and clean stage, I save the dataset as a